// import { Vector3 } from "three/src/math/Vector3";
import { MeshBasicMaterial, Mesh, Vector3, Plane, DoubleSide, PlaneGeometry, MathUtils, Matrix4, Matrix3 } from "three";
/**
 * 地理坐标中的一个三维点
 */
export default class Geodetic3D {
    /** 经度*/
    public longitude: number;

    /** 纬度*/
    public latitude: number;

    public height: number;

    public constructor(longitude: number, latitude: number, height: number) {
        this.longitude = longitude;
        this.latitude = latitude;
        this.height = height;
    }

    /**
     * 获取一个地理坐标的大地表面法线
     */
    public geodeticSurfaceNormal(): Vector3 {
        let cosLatitude: number = Math.cos(MathUtils.degToRad(this.latitude));

        return new Vector3(
            cosLatitude * Math.cos(MathUtils.degToRad(this.longitude)),
            cosLatitude * Math.sin(MathUtils.degToRad(this.longitude)),
            Math.sin(MathUtils.degToRad(this.latitude)));
    }

}